class CreateImage < ActiveRecord::Migration
  def change
    create_table :images do |t|
      t.string :url, null: false
      t.string :image_type, null: false, limit: 1
      t.integer :owner, null: false

      t.timestamps null: false
    end

    add_index :images, :image_type
    add_index :images, :owner
  end
end
